<?php use_helper('I18N') ?>
<?php use_stylesheets_for_form( $form ) ?>
<?php slot('sf_apply_login') ?>
<?php end_slot() ?>

<h1 class="title">Changer mon mot de passe</h1>
    <div class="box_relief yellow">
        <?php echo __('You may change your password using the form below.', array(), 'sfForkedApply') ?>
    </div>

  <?php foreach($form as $field => $f): ?>
    <?php $attributes[$field] = array() ?>
  <?php endforeach ?>

    <?php if ($form->hasErrors()): ?>
        <?php foreach($form as $field => $f): ?>
            <?php if($f->hasError()): ?>
                <?php $attributes[$field] = array('class' => 'error') ?>
            <?php endif ?>
        <?php endforeach ?>
        <div class="box_relief red">Les champ sont incomplets et/ou invalides.</div>
    <?php endif; ?>

    <form method="post" action="<?php echo url_for("sfApply/reset") ?>" name="sf_apply_reset_form" id="sf_apply_reset_form">
        <table>
            <tr>
                <td></td>
                <td><?php echo $form['password']->renderError() ?></td>
            </tr>
            <tr>
                <th><?php echo $form['password']->renderLabel('Choisissez un NOUVEAU mot de passe : ', $attributes['password']) ?></th>
                <td><?php echo $form['password']->render() ?></td>
            </tr>
            <tr>
                <td></td>
                <td><?php echo $form['password2']->renderError() ?></td>
            </tr>
            <tr>
                <th><?php echo $form['password2']->renderLabel('Confirmez votre NOUVEAU mot de passe : ', $attributes['password2']) ?></th>
                <td><?php echo $form['password2']->render() ?></td>
                <td><?php echo $form->renderHiddenFields(); ?></td>
            </tr>
            <tr>
              <td colspan="2" class="submitOrCancel">
                 <input class="box_relief dark_blue" type="submit" value="<?php echo __("Reset My Password", array(), 'sfForkedApply') ?>" />
              </td>
            </tr>
        </table>
    </form>
